Name: gnatcoll-core Version: 2018 Release: 1%{?dist} Summary: The GNAT Components Collection – core packages Summary(sv): GNAT Components Collection – centrala paket License: GPLv3+ URL: https://github.com/AdaCore/gnatcoll-core Source: http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a99#/gnatcoll-core-gpl-2018-src.tar.gz # The long hexadecimal number is what identifies the file on the server. # Don't forget to update it! # The latest known address of the download page is: # https://www.adacore.com/download/more BuildRequires: gcc-gnat gprbuild make sed fedora-gnat-project-common BuildRequires: libgpr-devel xmlada-devel # Build only on architectures where GPRbuild is available: ExclusiveArch: %{GPRbuild_arches} %global common_description_en \ This is the core module of the GNAT Components Collection. \ \ The GNAT Components Collection is a library of general-purpose packages that \ are part of the GNAT technology. The components complement the predefined Ada \ and GNAT libraries and deal with a range of common programming issues \ including string and text processing, memory management, and file handling. %global common_description_sv \ Det här är den centrala modulen i GNAT Components Collection. \ \ GNAT Components Collection är ett bibliotek med universalpaket som ingår i \ GNAT-sviten. Komponenterna kompletterar adas och GNATs fördefinierade \ bibliotek, och löser diverse vanliga programmeringsproblem såsom sträng- och \ textbehandling, minneshantering och filhantering. %description %{common_description_en} %description -l sv %{common_description_sv} %package devel Summary: Development files for the GNAT Components Collection – core packages Summary(sv): Filer för programmering med GNAT Components Collection – centrala paket Requires: %{name}%{?_isa} = %{version}-%{release} Requires: fedora-gnat-project-common %description devel %{common_description_en} The %{name}-devel package contains source code and linking information for developing applications that use %{name}. %description devel -l sv %{common_description_sv} Paketet %{name}-devel innehåller källkod och länkningsinformation som behövs för att utveckla program som använder %{name}. %prep %autosetup -n gnatcoll-core-gpl-2018-src %build make build-relocatable 'GPRBUILD_OPTIONS=%{GPRbuild_optflags}' %install make install-relocatable 'prefix=%{buildroot}%{_prefix} --sources-subdir=%{buildroot}%{_includedir}/%{name} --lib-subdir=%{buildroot}%{_libdir} --ali-subdir=%{buildroot}%{_libdir}/%{name} --no-lib-link -m' # The makefile doesn't anticipate the need to pass additional parameters to # GPRinstall, but it's possible to include them with the prefix and have them # expanded as separate parameters. # Fix up some things that Adacore does wrong. ln --symbolic --force libgnatcoll.so.%{version} %{buildroot}%{_libdir}/libgnatcoll.so mv %{buildroot}%{_datadir}/examples/gnatcoll %{buildroot}%{_docdir}/gnatcoll/examples mv %{buildroot}%{_docdir}/gnatcoll/html/html/* %{buildroot}%{_docdir}/gnatcoll/html/ rm --recursive --force %{buildroot}%{_docdir}/gnatcoll/html/html # GPRinstall's manifest files are architecture-specific because they contain # what seems to be checksums of architecture-specific files, so they must not # be under _datadir. Their function is poorly documented, but they seem to be # used when GPRinstall uninstalls packages. The manifest file is therefore # irrelevant in this RPM package, so delete it. rm --recursive --force %{buildroot}%{_GNAT_project_dir}/manifests # Make the generated usage project file architecture-independent. sed --regexp-extended --in-place \ '--expression=1i with "directories";' \ '--expression=s|^( *for +Source_Dirs +use +).*;$|\1(Directories.Includedir \& "/%{name}");|i' \ '--expression=s|^( *for +Library_Dir +use +).*;$|\1Directories.Libdir;|i' \ '--expression=s|^( *for +Library_ALI_Dir +use +).*;$|\1Directories.Libdir \& "/%{name}";|i' \ %{buildroot}%{_GNAT_project_dir}/*.gpr %check %{_rpmconfigdir}/check-rpaths %files %{_libdir}/*.so.* %license COPYING3 %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/%{name} %{_GNAT_project_dir}/* %doc %{_docdir}/gnatcoll %changelog * Mon Mar 04 2019 Björn Persson - 2018-1 - new package